<!--#include file="Config.asp"-->
<!--#include file="emp_is.asp"-->
<!--#include file="Header.asp"-->
<%
C_ID =int(Request("id"))
Set rs=Conn.Execute("Select * from CRM_List Where ID="&C_ID)
Name =Trim(rs("Name"))
Info =Trim(rs("Info"))
TypeID =Int(rs("TypeID"))
rs.Close

%>
<table class="table table-condensed table-bordered">
<tr>
<th colspan=5 align="center"><%=Name%>信息</td>
</tr>
<tr>
<td>Name：</td>
<td>
<input type="text" name="Name" value='<%=Name%>' size='50'/></td>
</tr>


<tr >
<td>Info：</td>
<td >
<input name="Info" type="text" value="<%=Info%>" size='50'>
</td>
</tr>
<tr >
<td >操作</td>
<td ><input type="submit" name="Submit" value="保存修改"></td>
</tr>
</table>

<!-- LogAddForm -->
<table class="table table-condensed table-bordered">
<tr>
<th colspan='10'><strong>1.属性日志 / Property Log</strong></th>
</tr>

<tr class="info">
<td>属性</td>
<td>明细</td>
<td>操作</td>
</tr>

<form method="post" action="CRM_Save.asp?action=SaveLog&C_ID=<%=C_ID%>">
<tr>
<td>
<select name="CP_ID">
<%
Set pa=Conn.Execute("Select id,name from [CRM_Property] where ID<>1 order by id")
Do While Not pa.Eof
%>
<option value='<%=int(pa(0))%>'><%=pa(0)%>.<%=pa(1)%></option>
<%
pa.MoveNext
Loop
pa.Close
Set pa=Nothing
%>
</select>
</td>
<td>
<input type="text" name="info" size='60' value='明细'/>
</td>
<td>
<input type="submit" value='<%=session("emp_name")%>保存'/>
</td>
</tr>
</form>
<!-- LogAddForm -->
<%
sql="select * from CRM_ListLog where C_ID="&C_ID&" order by id"
rs.open sql,conn,1,1
for r=1 to rs.recordcount
%>

<tr>
<td><%=getOrgPropertyName(int(rs("CP_ID")))%></td>
<td><%=Trim(rs("Info"))%></td>
<td><%=getUserName(int(rs("EMP_ID")))%>.<%=Trim(rs("AddTime"))%></td>
</tr>
<%
rs.moveNext
next
rs.close
%>

</table>

<!-- 关联的联系人 CRM_PersonLink-->
<table class="table table-condensed table-bordered">
<tr>
<th colspan='10'><strong>2.关联的联系人 / CRM_PersonLink</strong></th>
</tr>

<tr class="info">
<td>联系人</td>
<td>操作</td>
</tr>

<form method="post" action="CRM_Save.asp?action=SaveOPLink&C_ID=<%=C_ID%>">
<tr>
<td>
<select name="P_ID">
<%
Set pa=Conn.Execute("Select P_id,name from [CRM_PersonList] order by p_id")
Do While Not pa.Eof
%>
<option value='<%=int(pa(0))%>'><%=pa(0)%>.<%=pa(1)%></option>
<%
pa.MoveNext
Loop
pa.Close
Set pa=Nothing
%>
</select>
</td>
<td>
<input type="submit" value='<%=session("emp_name")%>保存'/>
</td>
</tr>
</form>
<!-- LogAddForm -->
<%
sql="select * from CRM_PersonLink where C_ID="&C_ID&" order by id"
rs.open sql,conn,1,1
for r=1 to rs.recordcount
%>

<tr>
<td><%=Trim(rs("P_ID"))%></td>
<td><%=getUserName(int(rs("EMP_ID")))%></td>
</tr>
<%
rs.moveNext
next
rs.close
%>

</table>

<!--#include file="Footer.asp" -->
